<!--
 * @Author: 宋杰
 * @Date: 2021-01-14 15:30:54
 * @LastEditors: Please set LastEditors
 * @LastEditTime: 2021-01-28 16:31:46
 * @Description: 一家十一口(猜一字) 机构端框架
-->
<template>
  <div class="body">
    <nav
      class="navbar navbar-default nav_bg"
      style="height: 50px;width: 100%;position: fixed;"
      role="navigation"
    >
      <div class="navbar-header">
        <span class="navbar-brand">
          <img src="../../../static/img/logo.png" />
        </span>
        <!--向左对齐-->
        <ul class="nav navbar-nav navbar-left left_part">
          <li class="nav_l_item " :class="{ nav_l: flag == '-1' }">
            <router-link to="HomePage">首页</router-link>
          </li>
          <li class="nav_l_item " :class="{ nav_l: flag == '-2' }">
            <router-link to="gradeEvaluation">等级评估</router-link>
          </li>
          <li class="nav_l_item " :class="{ nav_l: flag == '-3' }">
            <router-link to="creditInquiry">信用查询</router-link>
          </li>
          <li class="nav_l_item " :class="{ nav_l: flag == '-4' }">
            <router-link to="UserInformation">用户信息</router-link>
          </li>
          <li class="nav_l_item " :class="{ nav_l: flag == '-5' }">
            <router-link to="BusinessProject">经营项目</router-link>
          </li>
          <li class="nav_l_item " :class="{ nav_l: flag == '-6' }">
            <router-link to="creditReward">信用奖罚</router-link>
          </li>
        </ul>

        <div class="loR">
          <el-dropdown
            class="avatar-container right-menu-item hover-effect"
            trigger="click"
          >
            <div class="avatar-wrapper">
              <img src="../../../static/img/touxiang.png" style="width: 40px" />
              <span style="color: #000">机构</span>
              <i style="color: #000" class="el-icon-caret-bottom" />
            </div>

            <el-dropdown-menu slot="dropdown">
              <el-dropdown-item divided @click.native="logout">
                <span style="display: block">退出</span>
              </el-dropdown-item>
            </el-dropdown-menu>
          </el-dropdown>
        </div>
      </div>
    </nav>
    <!--内容区-->
    <section class="content-container">
      <div class="grid-content">
        <transition name="fade" mode="out-in">
          <router-view></router-view>
        </transition>
      </div>
    </section>

    <!-- 底部开始 -->
    <div class="footers">
      <div class="footer-center">
        <img src="../../../static/img/footrr.png" />
        <p style="margin-top:10px">
          版权所有：©江苏省建设教育协会 &#160; | &#160;
          地址:南京市南通路118号茂悦港5号楼8楼 &#12288;| &#12288; 邮编:210036
          &#12288;|&#12288;苏ICP备17047788号
        </p>
      </div>
      <!-- <div class="footer-right" >
					<div style="float:left">
						<p>网站服务</p>
						<p>返回首页</p>
						<p>行业服务</p>
					</div>
					<div style="float:right;margin-left:10px">
						<p>加入会员</p>
						<p>远程教育</p>
						<p>开展工作</p>
						
					</div>
				</div> -->
      <div class="tup">
        <img src="../../../static/img/tuceng.png" />
      </div>
    </div>
  </div>
</template>

<script>
import "../../../static/loginCss/icon.css";
import axios from "axios";
// import motai from './motai/motai'
export default {
  components: {
    //	motai
  },
  data() {
    return {
      isShow: false,
      input2: ""
    };
  },
  methods: {
    // LargeScreen(){
    // 	this.fullFlag = true;
    // 	this.$emit("fullFun",this.fullFlag);
    // 	this.$message({
    // 	  type: "success",
    // 	  message: "按 ESC 退出全屏"
    // 	});
    // },
    alertShow() {
      this.isShow = true;
    },
    hideAlert() {
      this.isShow = false;
    },
    toggle(k, v) {
      console.log(k, "55555");
      this.$admin.state.flag = k;
      if (v.moduleName != undefined) {
        this.$admin.state.navName = v.moduleName;
      }
      sessionStorage.setItem("flag", k);
    }
  },
  created() {
    console.log(this.$route.path, "转跳");
    if (this.$route.path == "/HomePage") {
      // debugger
      //	this.$admin.state.flag=this.$route.path;
      this.$admin.state.flag == -1;
      console.log(this.$admin.state.flag, "this.$admin.state.flag");
    }
  },
  mounted() {},
  methods: {
    toggle(k, v) {
      console.log(k, "55555");
      this.$admin.state.flag = k;
      if (v.moduleName != undefined) {
        this.$admin.state.navName = v.moduleName;
      }
      sessionStorage.setItem("flag", k);
    },

    //退出
    // logout() {
    //   this.$router.push(`/login`);
    // }
    //退出
    logout() {
      //全局存储token
      window.sessionStorage.clear()
      console.log("window.sessionStorage登出", window.sessionStorage);
      
      this.$router.push(`/`);
      location.reload() //退出时刷新页面清除 this.$router.addRoutes();添加的动态路由的缓存 （不是最优解）
    }
  },
  computed: {
    lists() {
      return this.$admin.state.list;
    },
    flag() {
      return this.$admin.state.flag;
    }
  }
};
$("#to_top").click(function() {
  $("html,body").animate({ scrollTop: 0 }, 200);
});
$(document).scroll(function() {
  var scroll_top = $(document).scrollTop();
  if (scroll_top > 100) {
    $("#to_top").show();
  } else {
    $("#to_top").hide();
  }
});
</script>

<style scoped>
.body {
  background: url(../../../static/loginImg/back.png);
  box-sizing: border-box;
  zoom: 1;
}
.tup {
  position: absolute;
  right: 0px;
  margin-top: 16px;
  margin-right: 66px;
}
.bank {
  margin-top: 15px;
  text-align: center;
}
.bank span {
  font-size: -webkit-xxx-large;
  color: cadetblue;
  vertical-align: middle;
}
.el-input {
  width: 20% !important;
}
/* 天气 */
.tianqi {
  position: absolute;
  margin-left: 258px;
  margin-top: 8px;
  background-color: beige;
  border-radius: 6px;
}
.sousu {
  position: absolute;
  margin-left: 729px;
  margin-top: 5px;
  background-color: beige;
  border-radius: 6px;
}

.navbar-default .navbar-brand {
  color: #f5f7fa !important;
}
.nav_l {
  background: rgba(255, 255, 255, 0.3) !important;
}
/* ul,
li {
  outline: none;
  list-style: none;
  padding: 0;
  margin: 0;
} */
/* ------ Nav ------ */

.navbar {
  border: solid 0px;
  border-radius: 0px;
}

.navbar-brand img {
  color: #f5f7fa;
  margin-top: -10px;
}

#alarmInfo {
  background: #ff6600;
}

.nav_bg {
  /* background: #006D8E url(../../../static/loginImg/nav_bg.jpg) no-repeat; */
  background-color: #ffffff;
  padding: 0 0;
  margin: 0 0;
  z-index: 9999;
}
/* left part > a */
/* .navbar .left_part {
  width: 50%;
} */

.navbar .left_part .nav_l_item {
  margin: 0;
  line-height: 50px;
  width: 90px;
  height: 50px;
  display: inline-block;
  text-align: center;
  color: #1b2531;
  font-size: 14px;
  font-weight: bold;
  border: solid 0px;
  cursor: pointer;
}

.navbar .left_part .nav_l_item:hover {
  text-decoration: none;
  color: #2276c3 !important;
  /*background: rgba(255, 255, 255, 0.3);*/
}

.navbar .left_part .nav_l_item :hover {
  color: #2276c3 !important;
}

.navbar .left_part .nav_l_item :focus {
  color: #2276c3 !important;
}
.navbar .left_part .nav_l_item :active {
  color: #2276c3 !important;
}
/* .navbar .left_part .item_selected{color:#fff !important;background:rgba(255,255,255,0.3);} */
/* right part */
.nav_l_item .active {
  color: #2276c3 !important;
}
.navbar .right_part {
  margin: 0;
  border: solid 0px;
}

.navbar .right_part .nav_r_item_start,
.nav_r_item_end {
  width: 40px;
  height: 50px;
  border: solid 0px;
}

.navbar .right_part .nav_r_item {
  height: 50px;
  margin-left: 0px;
  border: solid 0px;
}

.nav_r_item .drop-down-list-tip .list-group a.list-item {
  font-size: 14px;
  font-weight: normal;
}

.nav_r_item .drop-down-list-tip .list-group a.list-item:hover {
  font-size: 14px;
  font-weight: normal;
}
/* right part > a */

.navbar .right_part .nav_r_item a {
  padding: 0;
  margin: 17px 10px 0px 10px;
  line-height: 14px;
  color: #1b2531;
  font-size: 14px;
  font-weight: bold;
  border: solid 0px;
}

.navbar .right_part .nav_r_item a:hover {
  color: #1b2531;
  font-weight: bold;
}

.navbar .right_part .nav_r_item a:visited {
  color: #1b2531;
}

/* 第二导航 */
.government-box {
  margin: 37px 0;
  padding: 0 184px;
}
.government-box .government-ul {
  width: 100%;
  height: 100%;
  font-size: 16px;
  line-height: 30px;
  text-align: center;
  color: #fff;
  overflow: hidden;
}
.government-box .government-ul li {
  float: left;
  width: 92px;
  height: 100%;
  border-radius: 10px;
  margin: 0 12px;
}
.government-box .government-ul li:nth-child(10) {
  margin-right: 0;
}
a {
  text-decoration: none !important;
  color: #333;
}
.blue {
  line-height: 36px;
  background-color: #4b9bd8;
}
.blue-on {
  background-color: #0078d7;
}
#huilan {
  color: #fff;
  background-color: #1cb0b9;
}
/* 底部 */
.footers {
  position: fixed;
  bottom: 0;
  background-color: #093b69;
  text-decoration: none;
  width: 100%;
  z-index: 9999;
}
.footer-center {
  float: left;
  margin: 0;
  color: #fff;
  /* text-align: center; */
  text-decoration: none;
  padding: 1% 0;
  /* line-height: 30px; */
  font-size: 12px;
  margin-left: 40px;
}
.footer-right {
  float: right;
  /* margin: 0; */
  color: #fff;
  /* text-align: center; */
  /* text-decoration: none; */
  /* padding: 1% 0; */
  /* line-height: 18px; */
  font-size: 12px;
  margin-right: 191px;
  /* margin-top: 6px; */
  margin-top: 21px;
}

/* 侧边 */
.fan-top {
  cursor: pointer;
}
#slide {
  width: 200px;
  height: 200px;
  position: absolute;
  right: 64px;
  background: #fff;
  border: 1px solid #ccc;
  display: none;
  padding: 10px;
}
#slide img {
  width: 100%;
  height: 100%;
}
.float-right {
  position: fixed;
  right: 1%;
  top: 50%;
  width: 60px;
}
.float-right ul li {
  margin-bottom: 1px;
  border: 1px solid #0f9ca5;
  background-color: #0f9ca5;
  color: #fff;
  text-align: center;
  width: 58px;
  height: 58px;
}
.fankui {
  /* padding: 10px;
        box-sizing: border-box; */
  color: #fff;
}
.float-right ul li i {
  margin-top: 6px;
  font-size: 24px;
  display: block;
  overflow: hidden;
}
#to_top {
  font-size: 20px;
  line-height: 50px;
}
.loR {
  position: fixed;
  right: 0;
  margin-right: 34px;
}
.fan-top .er {
  margin: 4px;
  width: 50px;
}
#div1 {
  width: 1200px;
  height: 315px;
  position: relative;
  overflow: hidden;
}
#div1 ul {
  width: 1200px;
  height: 315px;
  position: relative;
}
#div1 ul li {
  width: 220px;
  height: 315px;
  float: left;
  list-style: none;
  cursor: pointer;
  margin: 0 10px;
}

/* 内容 */
/*.content-container{background-color: #ffffff;position: relative;}*/
/*.grid-content{position: absolute;top:0;bottom:0;left:0;right: 0;}*/
</style>
